#pragma once
#include "Symbol/TypeSymbol.hpp"
#include "Syntax/Object/Object.hpp"
#include <string>

class VariableSymbol;
typedef std::shared_ptr<VariableSymbol> SharedVariableSymbol;

class VariableSymbol
{
private:
    bool            ReadOnly;
    std::string     Name;
    SharedTypeSymbol Type;

public:
    VariableSymbol(std::string name, bool isReadOnly, SharedTypeSymbol type) : Name(name), Type(type), ReadOnly(isReadOnly){};

    std::string     GetName() const { return this->Name; }
    std::string     ToString() const { return this->Name; }
    SharedTypeSymbol GetType() const { return this->Type; }

    bool IsReadOnly() const { return this->ReadOnly; }

    bool operator==(const SharedVariableSymbol rhsName) { return this->GetName() == rhsName->GetName(); }
};
